package com.settlement.system.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.settlement.system.common.annotation.StorePermission;
import com.settlement.system.model.entity.DyOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.settlement.system.model.query.DyOrderPageQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 抖音订单 Mapper 接口
 * </p>
 *
 * @author huangrensen
 * @since 2023-08-05
 */
@Mapper
public interface DyOrderMapper extends BaseMapper<DyOrder> {

    /**
     * 创建表
     * @param tableName
     * @return
     */
    int createTable(@Param("tableName")String tableName);

    int insertData(DyOrder dyOrder);

    int update(DyOrder dyOrder);

    /**
     * 获取用户分页列表
     *
     * @param page
     * @param queryParams 查询参数
     * @return
     */
    @StorePermission
    Page<DyOrder> getPage(Page<DyOrder> page, DyOrderPageQuery queryParams);

    /**
     * 查询方法
     *
     * @param queryParams 查询参数
     * @return
     */
    List<DyOrder> getList(DyOrderPageQuery queryParams);

    int deleteById(Long id);

    int deleteByIds(List<Long> ids);

    /**
     * 是否存在表
     * @param tableName
     * @return
     */
    String existTable(@Param("tableName")String tableName);
}
